package com.ls.system.service.impl;



import com.ls.system.entity.SysUser;
import com.ls.system.mapper.SysUserMapper;
import com.ls.system.service.SysUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ls
 * @since 2025-04-06
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {

    @Autowired
    private SysUserMapper userMapper;

    @Override
    public boolean exists(String loginname) {
        return userMapper.findByLoginname(loginname) != null;
    }

    @Override
    public void saveUser(SysUser user) {
        userMapper.insertUser(user);
    }
}
